package com.bjsxt.utils;

import java.util.HashMap;
import java.util.Map;

public class MapParameter {

    Map<String,Object> paramMap = new HashMap<>();

    private MapParameter(){

    }

    public static MapParameter getInstance(){
        return new MapParameter();
    }

    public Map<String,Object> getMap(){
        return paramMap;
    }

    public MapParameter put(String key,Object values){
        paramMap.put(key,values);
        return this;
    }

    public MapParameter put(Map<String,Object>map){
        //注意设置map.entry的泛型
        for(Map.Entry<String,Object> entry :map.entrySet()){
            paramMap.put(entry.getKey(),entry.getValue());
        }
        return this;
    }

}
